JavaScript Dynamic News

This stationery page contains JavaScript that display a New icon

Please note that JavaScript is currently only available in Netscape Navigator 2.0 or higher.
Do not assume that all in your audience are using a JavaScript enabled browser.


Here is an example on how JavaScript can be used to display a NEW! image for contents that are new.

The script in the page handles this automatically so you will not have to keep track and upload an updated page just because something new should be considered old. The magic this script do is that the NEW! image will not be displayed after a date specified by you. The downside with using this script is that the image will only be displayed in JavaScript enabled browsers.


Examples:

New until January 15, 1997

New until March 15, 1997

New until May 15, 1997

New until August 31, 1997

New until September 15, 1997

New until October 15, 1997

New until December 15, 1997

New until March 1, 1998

New until May 15, 1998


How to use:
First, take a look at the HTML page for this file in PageSpinner. You will find the newUntil() script in the HEAD section and see examples on how to call the function to insert the new icon within your text in the BODY section.

Edit this page or copy the newUntil() script and the sample call of the function to the PageSpinner Notebook to get quick access to the script when you want to include it in your own pages.

You can easily change what should be displayed in the page by editing the contents inside the document.write() statement in the newUntil() function. The image used in this page is called new.gif and is located inside the same folder as this example file.

Example source on how to insert a new icon in a page:
Specify year, month (1-12) and the date for the last day the new image should be displayed in the call to the newUntil() function:

New until December 15, 1996 <SCRIPT> <!-- newUntil ( 1996, 12, 15 ); // --> </SCRIPT>
NOTE: When changing the date in the computers system to preview a page on a future date, you will most likely need to quit and reopen the browser to get the browser to notice the changes.